<script>

// 分配会籍经理modal
function assignMemship(uid, memshiId) {
    $("#memship_uid").val(uid);
    $("#memship_person_id").val(memshiId);
    $('#modifyMemshipPerModal').modal();
}

$(function() {
    
    // 分配会籍经理
    $("#save_memship").click(function(){
        var uid = $("#memship_uid").val();
        var memshipId = $("#memship_person_id").val();
        
        cAjax({
                    url:  "/crm/ocean/assignMemship",
                    data: {uid:uid,memshipId:memshipId},
                    success: function(data){
                                if(data.result) {
                                     $('#modifyMemshipPerModal').modal('hide');
                                    greeting({msg:"操作成功！", confirm:function(){
                                        location.reload();
                                    }});                                
                                } else {
                                    greeting({msg:"<h4 style=\"color:red\">失败，有错误！</h4>",title:"操作失败"});
                                }
                     },
                    error: function(obj) {
                    }
        }); 
                
    });
});
</script>